if (!manualMode)
this.actor.connect('button-press-event',
Lang.bind(this, this._onButtonPress));
+
+ this.actor.connect('destroy', Lang.bind(this, function() {
+ this.disconnectAll();
+ }));
this._onEventId = null;
this._buttonDown = false; // The mouse button has been pressed and has not yet been released.
},
_onDestroy: function() {
+ this.metaWindow._delegate = null;
+ this.actor._delegate = null;
if (this._zoomLightbox)
this._zoomLightbox.destroy();
+
+ this.disconnectAll();
},
_onEnter: function (actor, event) {
Mainloop.source_remove(this._repositionWindowsId);
this._repositionWindowsId = 0;
}
- Main.overview.connect('hidden', Lang.bind(this,
- this._doneLeavingOverview));
+ this._overviewHiddenId = Main.overview.connect('hidden', Lang.bind(this,
+ this._doneLeavingOverview));
// Position and scale the windows.
for (let i = 1; i < this._windows.length; i++) {
},
_onDestroy: function(actor) {
+ if (this._overviewHiddenId) {
+ Main.overview.disconnect(this._overviewHiddenId);
+ this._overviewHiddenId = 0;
+ }
Tweener.removeTweens(actor);
this._metaWorkspace.disconnect(this._windowAddedId);
// the desktop window, which is never reparented
for (let w = 1; w < this._windows.length; w++)
this._windows[w].destroy();
+ this._windows = [];
},
// Sets this.leavingOverview flag to false.